package com.ruoyi.web.controller.practice;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.entity.PracticePositions;
import com.ruoyi.system.service.IPracticePositionsService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;


@Controller
@RequestMapping("/practice/positions")
public class PositionsController extends BaseController {

    private String prefix = "practice/positions";

    @Autowired
    private IPracticePositionsService practicePositionsService;

    @RequiresPermissions("practice:positions:view")
    @GetMapping()
    public String post(@Validated PracticePositions practicePositions, ModelMap mmap)
    {
        mmap.addAttribute("items",practicePositionsService.selectPracticePositionsList(practicePositions));
        return prefix + "/positions";
    }
}
